package main

import (
	"GoLearn2024/day03/06_grpc/pb"
	"GoLearn2024/day03/06_grpc/serviceImpl"
	"google.golang.org/grpc"
	"net"
)

func main() {
	srv := grpc.NewServer()
	pb.RegisterMessageSenderServer(srv, serviceImpl.MessageSenderServerImpl{})

	liser, err := net.Listen("tcp", ":8082")
	if err != nil {
		panic(err)
	}
	if err := srv.Serve(liser); err != nil {
		panic(err)
	}
}
